Repository navigation
test(controlplane): turn off postgres durability in the test container - #3646
Conversation
The integration test database is disposable, so start it with fsync, synchronous_commit and full_page_writes off and keep its data directory on tmpfs. This makes the control plane test suite run faster. Closes #3645 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: 3a3863d9-a0d3-432b-9ce7-eb6c74404598
PR validation — ✅ 3 passing
AI Session Checks — 🟢 88% · ✅ 0 failing
|
| Status | Attribution | File | Lines |
|---|---|---|---|
| modified | ai | app/controlplane/pkg/biz/testhelpers/database.go |
+9 / -0 |
Policies (5)
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-session-no-auto-pr |
ai-coding-session-3a3863 |
- |
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-3a3863 |
- |
| ✅ Passed | ai-config-no-dangerous-commands |
ai-coding-session-3a3863 |
- |
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-3a3863 |
- |
| ✅ Passed | ai-config-mcp-servers-allowed |
ai-coding-session-3a3863 |
- |
Security Checks — ✅ 5 passing
✅ secret-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ sast-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | cwe-top26-40-cusp |
- |
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
Scans not applied (3)
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
iac-scan |
no IaC files changed |
Security context
✅ Nothing this change touches has a recorded security-fix history.
View in Chainloop ↗ · How this works ↗
Powered by Chainloop and Chainloop Trace
There was a problem hiding this comment.
No issues found across 1 file
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Re-trigger cubic
Start the control plane integration test PostgreSQL container with durability off. The test database is thrown away after each run, so it does not need writes to reach the disk.
NewTestDatabasenow startspostgres:16-alpinewithfsync=off,synchronous_commit=offandfull_page_writes=off, and keeps the data directory on tmpfs. These settings apply only to the disposable test container.Run times
Command:
go test -count=1 -timeout 30m $(go list ./... | grep -v /pkg/data/ent)inapp/controlplane(themake testpackage list, uncached, with a longer timeout sopkg/bizcan finish).Machine: Intel i7-7700K (8 threads), 32 GB RAM, Fedora 43, Docker. Other jobs shared the machine (load average 2-9), so read the numbers as approximate.
pkg/bizThe suite is about 45% faster. Before the change, several suites failed under load because the container did not get ready within the 5s startup wait. After the change, no container startup timed out in either run.
Closes #3645
This change was made with AI assistance (Claude Code).
🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri using the eng-autopilot skill